home *** CD-ROM | disk | FTP | other *** search
/ 1,000+ Great Games / 1_1000 Games.iso / DOSGAMES / BOGGLE.ZIP / SOURCE.ZIP / BOGWIN.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-18  |  2.9 KB  |  90 lines

  1. //**  bogwin.h  *********************************************************
  2. //
  3. //  Boggle Window class
  4. //
  5. #ifndef  BOGWIN_H
  6. #define  BOGWIN_H
  7.  
  8. class TBogWindow;          //forward declare this class
  9.  
  10. #include  "common.hpp"
  11. #include  <iframe.hpp>
  12. #include  <ipainhdr.hpp>         /* IPaintHandler               */
  13. #include  <ipainevt.hpp>         /* IPaintEvent                 */
  14. #include  <imenubar.hpp>         /* IMenu Stuff                 */
  15. #include  <icmdhdr.hpp>          /* ICommandHandler             */
  16. #include  <imchdr.hpp>           /* Mouse commands              */
  17. #include  <imoushdr.hpp>
  18. #include  <imousevt.hpp>
  19. #include  <icanvas.hpp>          /* Canvas class stuff          */
  20. #include  <imcelcv.hpp>          /* Multicell Canvas class      */
  21. #include  <iaccel.hpp>           /* Menu accelerator stuff      */
  22. #include  <ipushbut.hpp>         /* push button stuff           */
  23.  
  24. #include <ihelp.hpp>
  25. #include <ihelphdr.hpp>
  26.  
  27. #include  "sound.hpp"
  28. #include  "board.hpp"
  29. #include  "menu.hpp"
  30. #include  "square.hpp"
  31. #include  "wlist.hpp"
  32. #include  "timer.hpp"
  33. #include  "wip.hpp"
  34.   
  35. class TBogWindow : public IFrameWindow, public ICommandHandler,
  36.                    public IPaintHandler, public IMouseClickHandler
  37. {
  38.    private:
  39.      IHelpWindow                         help;
  40.      IHelpHandler                        helpHandler;
  41.  
  42.      IMenuBar          menuBar;
  43.      IMultiCellCanvas  Client;
  44.      IStaticText       gameTitle;
  45.      IFont             myfont;
  46.      IColor            color;
  47.      TBogBoard         *pboard;
  48.      TBogWordList      *plist;
  49.      TBogTimer         *ptimer;
  50.      TBogWIP           *pwip;
  51.      TBogScore         *pscore;
  52.      Sound             *psound;
  53.  
  54.      IStaticText       st_wip;
  55.      IStaticText       st_list;
  56.      IStaticText       st_timer;
  57.      IStaticText       st_score;
  58.  
  59.      Boolean     GameOn;
  60.      long        TickDuration;
  61.      Boolean     bSound;
  62.  
  63.    protected:
  64.     /* -------------------------------------------------------- */
  65.     /* declare the event handlers. These event handlers are all */
  66.     /* pure virtual functions in their respective base classes  */
  67.     /* -------------------------------------------------------- */
  68.     virtual Boolean command(ICommandEvent&);
  69.     virtual Boolean paintWindow(IPaintEvent &);
  70.     virtual Boolean mouseClicked(IMouseClickEvent &);
  71.     void settings();
  72.     void aboutBox();
  73.     void resumeGame();
  74.     void pauseGame();
  75.     void resetGame(ICommandEvent& event);
  76.  
  77.  
  78.    public :
  79.      TBogWindow (const char *title, unsigned long id);
  80.      ~TBogWindow();
  81.      Boolean isGameOn() {return (GameOn); }
  82.      void gameOver();
  83.      void SetTickDuration(long time) {TickDuration = time; }
  84.      long GetTickDuration() {return TickDuration; }
  85.  
  86.      void SetSoundFlag(Boolean flag) {bSound = flag; }
  87.      Boolean GetSoundFlag() {return bSound; }
  88. } ;
  89. #endif
  90.